<template>
  <div class="main_container">
    <div class="hello">
      <a-spin :spinning="loading" tip="拼命加载中..."></a-spin>
      <h1 v-if="!loading">Hello World</h1>
    </div>
  </div>
</template>

<script>
import { message } from 'ant-design-vue';
export default {
  name: 'HelloWorld',
  props: {
    msg: String
  },
  data(){
    return{
      loading: true,
    }
  },
  mounted(){
    this.loadingDemo()
  },
  methods: {
    loadingDemo(){
      setTimeout(() => {
        message.success('加载完成');
        this.loading = false;
      }, 1000);
    }
  },
  
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h3 {
  margin: 40px 0 0;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
